import request from "@/utils/request";
import cfg from "@/config/config";

const leaveTypeDefinition = {
  //获取请假单列表（不用）
  getLeaveTypeList: param => {
    return request(
      "post",
      cfg.apiUrl + "api/leaveTypeDefinition/getLeaveTypeList",
      param
    );
  },
  addLeaveType: param => {
    return request(
      "post",
      cfg.apiUrl + "api/leaveTypeDefinition/addLeaveType",
      param
    );
  },
  updateLeaveType: param => {
    return request(
      "post",
      cfg.apiUrl + "api/leaveTypeDefinition/updateLeaveType",
      param
    );
  },
  deleteLeaveType: param => {
    return request(
      "post",
      cfg.apiUrl + "api/leaveTypeDefinition/deleteLeaveType",
      param
    );
  },
  deleteLeaveType2: param => {
    return request(
      "post",
      cfg.apiUrl + "api/leaveTypeDefinition/deleteLeaveType2",
      param
    );
  }
};

export default leaveTypeDefinition;
